
package com.eyedog.video.widgets;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.ImageView;

import com.eyedog.library.utils.DensityUtils;
import com.eyedog.uilibrary.widgets.RoundViewOutlineProvider;

public class VideoImageView extends ImageView {

    public VideoImageView(Context context) {
        this(context, null);
    }

    public VideoImageView(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public VideoImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        this(context, attrs, defStyleAttr, 0);
    }

    public VideoImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
                        int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        setOutlineProvider(new RoundViewOutlineProvider(DensityUtils.dp2px(context, 10)));
        setClipToOutline(true);
    }
}
